From 9851c8e77e8da55e5bef15e52048669480e38f1d Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 10 Sep 2008 11:17:13 +0100 Subject: [PATCH] CPUIDLE: Adjust Cx residency to contain Cx exit latency & overhead. Signed-off-by: Wei Gang --- xen/arch/x86/acpi/cpu_idle.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index cd597b0b11..ae8f3bc599 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -402,8 +402,7 @@ static void acpi_processor_idle(void) /* Re-enable interrupts */ local_irq_enable(); /* Compute time (ticks) that we were actually asleep */ - sleep_ticks = - ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD; + sleep_ticks = ticks_elapsed(t1, t2); break; case ACPI_STATE_C3: @@ -471,8 +470,6 @@ static void acpi_processor_idle(void) lapic_timer_on(); /* Compute time (ticks) that we were actually asleep */ sleep_ticks = ticks_elapsed(t1, t2); - /* Do not account our idle-switching overhead: */ - sleep_ticks -= cx->latency_ticks + C3_OVERHEAD; break; @@ -482,7 +479,7 @@ static void acpi_processor_idle(void) } cx->usage++; - if ( (cx->type != ACPI_STATE_C1) && (sleep_ticks > 0) ) + if ( sleep_ticks > 0 ) cx->time += sleep_ticks; next_state = power->state; -- 2.30.2